import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:yi_shop/utils/colors.dart';
import 'package:yi_shop/utils/styles.dart';
import 'package:yi_shop/utils/svg.dart';

/// 买家申请
class BarterInfoApplyController extends GetxController {}

class BarterInfoApplyView extends GetView<BarterInfoApplyController> {
  const BarterInfoApplyView({super.key});

  @override
  Widget build(BuildContext context) {
    return SingleChildScrollView(
      child: Column(
        children: [
          Container(
            height: 100,
            color: ColorsUtils.parseColorFromHexString(ColorsUtils.colorF048),
            padding: const EdgeInsets.symmetric(horizontal: 25),
            child: Column(
              children: [
                Container(
                  padding: const EdgeInsets.only(top: 20),
                  alignment: Alignment.centerLeft,
                  child: Text(
                    '买家申请',
                    style: StylesUtils.customTextStyle(fontSize: StylesUtils.fontSize18),
                  ),
                ),
                Container(
                  padding: const EdgeInsets.only(top: 20),
                  alignment: Alignment.centerLeft,
                  child: Text(
                    '2019年4月7日  13:04',
                    style: StylesUtils.customTextStyle(),
                  ),
                ),
              ],
            ),
          ),
          Container(
            margin: const EdgeInsets.only(top: 30),
            padding: const EdgeInsets.symmetric(horizontal: 10),
            alignment: Alignment.center,
            child: CustomPaint(
              painter: _DrawLine(x: 50),
              child: Row(
                crossAxisAlignment: CrossAxisAlignment.start,
                mainAxisAlignment: MainAxisAlignment.start,
                children: [
                  Expanded(
                      child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    mainAxisAlignment: MainAxisAlignment.start,
                    children: [
                      Container(
                          alignment: Alignment.center,
                          child: CircleAvatar(
                            radius: 25,
                            backgroundColor:
                                ColorsUtils.parseColorFromHexString(ColorsUtils.colorF048),
                            child: SvgUtils.assetName('u12779', width: 25, height: 17),
                          )),
                      Container(
                        margin: const EdgeInsets.only(top: 20),
                        alignment: Alignment.center,
                        child: Text(
                          '买家申请',
                          style: StylesUtils.customTextStyle(color: ColorsUtils.color3333),
                        ),
                      ),
                      Container(
                        margin: const EdgeInsets.only(top: 15),
                        alignment: Alignment.center,
                        child: Text(
                          '2019-4-7 13:04',
                          style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color9999, fontSize: StylesUtils.fontSize10),
                        ),
                      ),
                    ],
                  )),
                  Expanded(
                      child: Column(
                    children: [
                      Container(
                          alignment: Alignment.center,
                          child: CircleAvatar(
                            radius: 25,
                            backgroundColor:
                                ColorsUtils.parseColorFromHexString(ColorsUtils.colorFbb8),
                            child: SvgUtils.assetName('u12779', width: 25, height: 17),
                          )),
                      Container(
                        margin: const EdgeInsets.only(top: 20),
                        alignment: Alignment.center,
                        child: Text(
                          '商家同意',
                          style: StylesUtils.customTextStyle(color: ColorsUtils.color9999),
                        ),
                      ),
                    ],
                  )),
                  Expanded(
                      child: Column(
                    children: [
                      Container(
                          alignment: Alignment.center,
                          child: CircleAvatar(
                            radius: 25,
                            backgroundColor:
                                ColorsUtils.parseColorFromHexString(ColorsUtils.colorFbb8),
                            child: SvgUtils.assetName('u12779', width: 25, height: 17),
                          )),
                      Container(
                        margin: const EdgeInsets.only(top: 20),
                        alignment: Alignment.center,
                        child: Text(
                          '商家发货',
                          style: StylesUtils.customTextStyle(color: ColorsUtils.color9999),
                        ),
                      ),
                    ],
                  )),
                  Expanded(
                      child: Column(
                    children: [
                      Container(
                          alignment: Alignment.center,
                          child: CircleAvatar(
                            radius: 25,
                            backgroundColor:
                                ColorsUtils.parseColorFromHexString(ColorsUtils.colorFbb8),
                            child: SvgUtils.assetName('u12779', width: 25, height: 17),
                          )),
                      Container(
                        margin: const EdgeInsets.only(top: 20),
                        alignment: Alignment.center,
                        child: Text(
                          '换货成功',
                          style: StylesUtils.customTextStyle(color: ColorsUtils.color9999),
                        ),
                      ),
                    ],
                  )),
                ],
              ),
            ),
          ),
          Container(
            padding: const EdgeInsets.only(left: 15),
            margin: const EdgeInsets.only(top: 30, bottom: 20),
            alignment: Alignment.centerLeft,
            child: Text(
              '买家收货后则换货成功',
              style: StylesUtils.customTextStyle(
                  color: ColorsUtils.color9999, fontSize: StylesUtils.fontSize12),
            ),
          ),
          Container(
            padding: const EdgeInsets.only(left: 15, bottom: 15),
            alignment: Alignment.centerLeft,
            child: Text(
              '换货信息',
              style: StylesUtils.customTextStyle(
                color: ColorsUtils.color6666,
              ),
            ),
          ),
          Container(
            color: ColorsUtils.parseColorFromHexString(ColorsUtils.colorF2f2),
            height: 116,
            padding: const EdgeInsets.symmetric(horizontal: 25, vertical: 10),
            child: Row(
              crossAxisAlignment: CrossAxisAlignment.start,
              mainAxisAlignment: MainAxisAlignment.start,
              children: [
                CachedNetworkImage(
                  imageUrl:
                      'https://img.alicdn.com/imgextra/i2/3517899888/O1CN01zcysko2MulFTX956t_!!0-saturn_solar.jpg_360x360xzq75.jpg_.webp',
                  width: 95,
                  height: 95,
                  fit: BoxFit.fill,
                ),
                Expanded(
                    child: Padding(
                  padding: const EdgeInsets.only(left: 10),
                  child: Column(
                    children: [
                      Container(
                        alignment: Alignment.topLeft,
                        child: Text(
                          '德国巴斯夫快乐跑燃油宝汽油添加剂积碳清洗剂节油奔驰宝马保时捷',
                          style: StylesUtils.customTextStyle(color: ColorsUtils.color3333),
                        ),
                      ),
                      Container(
                          margin: const EdgeInsets.only(top: 20),
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '每瓶50ml x 5瓶',
                            style: StylesUtils.customTextStyle(color: ColorsUtils.color9999),
                          )),
                    ],
                  ),
                ))
              ],
            ),
          ),
          Container(
            padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 25),
            child: Column(
              children: [
                Container(
                  alignment: Alignment.centerLeft,
                  child: Text(
                    '换货原因：尺码拍错/不喜欢/效果差',
                    style: StylesUtils.customTextStyle(
                        color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                  ),
                ),
                Container(
                  margin: const EdgeInsets.symmetric(vertical: 10),
                  alignment: Alignment.centerLeft,
                  child: Text(
                    '退款金额：100点+¥58.00',
                    style: StylesUtils.customTextStyle(
                        color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                  ),
                ),
                Container(
                  alignment: Alignment.centerLeft,
                  child: Text(
                    '申请件数：1',
                    style: StylesUtils.customTextStyle(
                        color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                  ),
                ),
                Container(
                  margin: const EdgeInsets.symmetric(vertical: 10),
                  alignment: Alignment.centerLeft,
                  child: Text(
                    '申请时间：2019-4-7 13:04',
                    style: StylesUtils.customTextStyle(
                        color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                  ),
                ),
                Container(
                  alignment: Alignment.centerLeft,
                  child: Text(
                    '退款编号：23271424057214640',
                    style: StylesUtils.customTextStyle(
                        color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                  ),
                ),
                Container(
                  margin: const EdgeInsets.only(top: 25),
                  alignment: Alignment.centerLeft,
                  child: Text.rich(TextSpan(children: [
                    TextSpan(
                        text: '商家售后服务电话 ',
                        style: StylesUtils.customTextStyle(
                            color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13)),
                    TextSpan(
                        text: '010-82381908',
                        style: StylesUtils.customTextStyle(
                            color: ColorsUtils.color0000, fontSize: StylesUtils.fontSize13))
                  ])),
                )
              ],
            ),
          )
        ],
      ),
    );
  }
}

/// 商家同意
class BarterInfoAgreeController extends GetxController {}

class BarterInfoAgreeView extends GetView<BarterInfoAgreeController> {
  const BarterInfoAgreeView({super.key});

  @override
  Widget build(BuildContext context) {
    return SingleChildScrollView(
        child: Column(
      children: [
        Container(
          height: 100,
          color: ColorsUtils.parseColorFromHexString(ColorsUtils.colorF048),
          padding: const EdgeInsets.symmetric(horizontal: 25),
          child: Column(
            children: [
              Container(
                padding: const EdgeInsets.only(top: 20),
                alignment: Alignment.centerLeft,
                child: Text(
                  '商家同意',
                  style: StylesUtils.customTextStyle(fontSize: StylesUtils.fontSize18),
                ),
              ),
              Container(
                padding: const EdgeInsets.only(top: 20),
                alignment: Alignment.centerLeft,
                child: Text(
                  '2019年4月7日  13:04',
                  style: StylesUtils.customTextStyle(),
                ),
              ),
            ],
          ),
        ),
        Container(
          margin: const EdgeInsets.only(top: 30),
          padding: const EdgeInsets.symmetric(horizontal: 10),
          alignment: Alignment.center,
          child: CustomPaint(
            painter: _DrawLine(x: 50),
            child: Row(
              crossAxisAlignment: CrossAxisAlignment.start,
              mainAxisAlignment: MainAxisAlignment.start,
              children: [
                Expanded(
                    child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  mainAxisAlignment: MainAxisAlignment.start,
                  children: [
                    Container(
                        alignment: Alignment.center,
                        child: CircleAvatar(
                          radius: 25,
                          backgroundColor:
                              ColorsUtils.parseColorFromHexString(ColorsUtils.colorF048),
                          child: SvgUtils.assetName('u12779', width: 25, height: 17),
                        )),
                    Container(
                      margin: const EdgeInsets.only(top: 20),
                      alignment: Alignment.center,
                      child: Text(
                        '买家申请',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color3333),
                      ),
                    ),
                    Container(
                      margin: const EdgeInsets.only(top: 15),
                      alignment: Alignment.center,
                      child: Text(
                        '2019-4-7 13:04',
                        style: StylesUtils.customTextStyle(
                            color: ColorsUtils.color9999, fontSize: StylesUtils.fontSize10),
                      ),
                    ),
                  ],
                )),
                Expanded(
                    child: Column(
                  children: [
                    Container(
                        alignment: Alignment.center,
                        child: CircleAvatar(
                          radius: 25,
                          backgroundColor:
                              ColorsUtils.parseColorFromHexString(ColorsUtils.colorF048),
                          child: SvgUtils.assetName('u12779', width: 25, height: 17),
                        )),
                    Container(
                      margin: const EdgeInsets.only(top: 20),
                      alignment: Alignment.center,
                      child: Text(
                        '商家同意',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color3333),
                      ),
                    ),
                    Container(
                      margin: const EdgeInsets.only(top: 15),
                      alignment: Alignment.center,
                      child: Text(
                        '2019-4-8 15:31',
                        style: StylesUtils.customTextStyle(
                            color: ColorsUtils.color9999, fontSize: StylesUtils.fontSize10),
                      ),
                    ),
                  ],
                )),
                Expanded(
                    child: Column(
                  children: [
                    Container(
                        alignment: Alignment.center,
                        child: CircleAvatar(
                          radius: 25,
                          backgroundColor:
                              ColorsUtils.parseColorFromHexString(ColorsUtils.colorFbb8),
                          child: SvgUtils.assetName('u12779', width: 25, height: 17),
                        )),
                    Container(
                      margin: const EdgeInsets.only(top: 20),
                      alignment: Alignment.center,
                      child: Text(
                        '商家发货',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color9999),
                      ),
                    ),
                  ],
                )),
                Expanded(
                    child: Column(
                  children: [
                    Container(
                        alignment: Alignment.center,
                        child: CircleAvatar(
                          radius: 25,
                          backgroundColor:
                              ColorsUtils.parseColorFromHexString(ColorsUtils.colorFbb8),
                          child: SvgUtils.assetName('u12779', width: 25, height: 17),
                        )),
                    Container(
                      margin: const EdgeInsets.only(top: 20),
                      alignment: Alignment.center,
                      child: Text(
                        '换货成功',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color9999),
                      ),
                    ),
                  ],
                )),
              ],
            ),
          ),
        ),
        Container(
          padding: const EdgeInsets.only(left: 15),
          margin: const EdgeInsets.only(top: 30, bottom: 20),
          alignment: Alignment.centerLeft,
          child: Text(
            '买家收货后则换货成功',
            style: StylesUtils.customTextStyle(
                color: ColorsUtils.color9999, fontSize: StylesUtils.fontSize12),
          ),
        ),
        Container(
          padding: const EdgeInsets.only(left: 15, bottom: 15),
          alignment: Alignment.centerLeft,
          child: Text(
            '换货信息',
            style: StylesUtils.customTextStyle(
              color: ColorsUtils.color6666,
            ),
          ),
        ),
        Container(
          color: ColorsUtils.parseColorFromHexString(ColorsUtils.colorF2f2),
          height: 116,
          padding: const EdgeInsets.symmetric(horizontal: 25, vertical: 10),
          child: Row(
            crossAxisAlignment: CrossAxisAlignment.start,
            mainAxisAlignment: MainAxisAlignment.start,
            children: [
              CachedNetworkImage(
                imageUrl:
                    'https://img.alicdn.com/imgextra/i2/3517899888/O1CN01zcysko2MulFTX956t_!!0-saturn_solar.jpg_360x360xzq75.jpg_.webp',
                width: 95,
                height: 95,
                fit: BoxFit.fill,
              ),
              Expanded(
                  child: Padding(
                padding: const EdgeInsets.only(left: 10),
                child: Column(
                  children: [
                    Container(
                      alignment: Alignment.topLeft,
                      child: Text(
                        '德国巴斯夫快乐跑燃油宝汽油添加剂积碳清洗剂节油奔驰宝马保时捷',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color3333),
                      ),
                    ),
                    Container(
                        margin: const EdgeInsets.only(top: 20),
                        alignment: Alignment.centerLeft,
                        child: Text(
                          '每瓶50ml x 5瓶',
                          style: StylesUtils.customTextStyle(color: ColorsUtils.color9999),
                        )),
                  ],
                ),
              ))
            ],
          ),
        ),
        Container(
          padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 25),
          child: Column(
            children: [
              Container(
                alignment: Alignment.centerLeft,
                child: Text(
                  '换货原因：尺码拍错/不喜欢/效果差',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                ),
              ),
              Container(
                margin: const EdgeInsets.symmetric(vertical: 10),
                alignment: Alignment.centerLeft,
                child: Text(
                  '退款金额：100点+¥58.00',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                ),
              ),
              Container(
                alignment: Alignment.centerLeft,
                child: Text(
                  '申请件数：1',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                ),
              ),
              Container(
                margin: const EdgeInsets.symmetric(vertical: 10),
                alignment: Alignment.centerLeft,
                child: Text(
                  '申请时间：2019-4-7 13:04',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                ),
              ),
              Container(
                alignment: Alignment.centerLeft,
                child: Text(
                  '退款编号：23271424057214640',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                ),
              ),
              Container(
                margin: const EdgeInsets.only(top: 25),
                alignment: Alignment.centerLeft,
                child: Text.rich(TextSpan(children: [
                  TextSpan(
                      text: '商家售后服务电话 ',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13)),
                  TextSpan(
                      text: '010-82381908',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color0000, fontSize: StylesUtils.fontSize13))
                ])),
              )
            ],
          ),
        )
      ],
    ));
  }
}

/// 商家发货
class BarterInfoDeliveryController extends GetxController {}

class BarterInfoDeliveryView extends GetView<BarterInfoDeliveryController> {
  const BarterInfoDeliveryView({super.key});

  @override
  Widget build(BuildContext context) {
    return SingleChildScrollView(
        child: Column(
      children: [
        Container(
          height: 100,
          color: ColorsUtils.parseColorFromHexString(ColorsUtils.colorF048),
          padding: const EdgeInsets.symmetric(horizontal: 25),
          child: Column(
            children: [
              Container(
                padding: const EdgeInsets.only(top: 20),
                alignment: Alignment.centerLeft,
                child: Text(
                  '商家发货',
                  style: StylesUtils.customTextStyle(fontSize: StylesUtils.fontSize18),
                ),
              ),
              Container(
                padding: const EdgeInsets.only(top: 20),
                alignment: Alignment.centerLeft,
                child: Text(
                  '2019年4月7日  13:04',
                  style: StylesUtils.customTextStyle(),
                ),
              ),
            ],
          ),
        ),
        Container(
          margin: const EdgeInsets.only(top: 30),
          padding: const EdgeInsets.symmetric(horizontal: 10),
          alignment: Alignment.center,
          child: CustomPaint(
            painter: _DrawLine(x: 50),
            child: Row(
              crossAxisAlignment: CrossAxisAlignment.start,
              mainAxisAlignment: MainAxisAlignment.start,
              children: [
                Expanded(
                    child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  mainAxisAlignment: MainAxisAlignment.start,
                  children: [
                    Container(
                        alignment: Alignment.center,
                        child: CircleAvatar(
                          radius: 25,
                          backgroundColor:
                              ColorsUtils.parseColorFromHexString(ColorsUtils.colorF048),
                          child: SvgUtils.assetName('u12779', width: 25, height: 17),
                        )),
                    Container(
                      margin: const EdgeInsets.only(top: 20),
                      alignment: Alignment.center,
                      child: Text(
                        '买家申请',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color3333),
                      ),
                    ),
                    Container(
                      margin: const EdgeInsets.only(top: 15),
                      alignment: Alignment.center,
                      child: Text(
                        '2019-4-7 13:04',
                        style: StylesUtils.customTextStyle(
                            color: ColorsUtils.color9999, fontSize: StylesUtils.fontSize10),
                      ),
                    ),
                  ],
                )),
                Expanded(
                    child: Column(
                  children: [
                    Container(
                        alignment: Alignment.center,
                        child: CircleAvatar(
                          radius: 25,
                          backgroundColor:
                              ColorsUtils.parseColorFromHexString(ColorsUtils.colorF048),
                          child: SvgUtils.assetName('u12779', width: 25, height: 17),
                        )),
                    Container(
                      margin: const EdgeInsets.only(top: 20),
                      alignment: Alignment.center,
                      child: Text(
                        '商家同意',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color3333),
                      ),
                    ),
                    Container(
                      margin: const EdgeInsets.only(top: 15),
                      alignment: Alignment.center,
                      child: Text(
                        '2019-4-8 15:31',
                        style: StylesUtils.customTextStyle(
                            color: ColorsUtils.color9999, fontSize: StylesUtils.fontSize10),
                      ),
                    ),
                  ],
                )),
                Expanded(
                    child: Column(
                  children: [
                    Container(
                        alignment: Alignment.center,
                        child: CircleAvatar(
                          radius: 25,
                          backgroundColor:
                              ColorsUtils.parseColorFromHexString(ColorsUtils.colorF048),
                          child: SvgUtils.assetName('u12779', width: 25, height: 17),
                        )),
                    Container(
                      margin: const EdgeInsets.only(top: 20),
                      alignment: Alignment.center,
                      child: Text(
                        '商家发货',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color3333),
                      ),
                    ),
                    Container(
                      margin: const EdgeInsets.only(top: 15),
                      alignment: Alignment.center,
                      child: Text(
                        '2019-4-9 11:28',
                        style: StylesUtils.customTextStyle(
                            color: ColorsUtils.color9999, fontSize: StylesUtils.fontSize10),
                      ),
                    ),
                  ],
                )),
                Expanded(
                    child: Column(
                  children: [
                    Container(
                        alignment: Alignment.center,
                        child: CircleAvatar(
                          radius: 25,
                          backgroundColor:
                              ColorsUtils.parseColorFromHexString(ColorsUtils.colorFbb8),
                          child: SvgUtils.assetName('u12779', width: 25, height: 17),
                        )),
                    Container(
                      margin: const EdgeInsets.only(top: 20),
                      alignment: Alignment.center,
                      child: Text(
                        '换货成功',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color9999),
                      ),
                    ),
                  ],
                )),
              ],
            ),
          ),
        ),
        Container(
          padding: const EdgeInsets.only(left: 15),
          margin: const EdgeInsets.only(top: 30, bottom: 20),
          alignment: Alignment.centerLeft,
          child: Text(
            '买家收货后则换货成功',
            style: StylesUtils.customTextStyle(
                color: ColorsUtils.color9999, fontSize: StylesUtils.fontSize12),
          ),
        ),
        Container(
          padding: const EdgeInsets.only(left: 15, bottom: 15),
          alignment: Alignment.centerLeft,
          child: Text(
            '换货信息',
            style: StylesUtils.customTextStyle(
              color: ColorsUtils.color6666,
            ),
          ),
        ),
        Container(
          color: ColorsUtils.parseColorFromHexString(ColorsUtils.colorF2f2),
          height: 116,
          padding: const EdgeInsets.symmetric(horizontal: 25, vertical: 10),
          child: Row(
            crossAxisAlignment: CrossAxisAlignment.start,
            mainAxisAlignment: MainAxisAlignment.start,
            children: [
              CachedNetworkImage(
                imageUrl:
                    'https://img.alicdn.com/imgextra/i2/3517899888/O1CN01zcysko2MulFTX956t_!!0-saturn_solar.jpg_360x360xzq75.jpg_.webp',
                width: 95,
                height: 95,
                fit: BoxFit.fill,
              ),
              Expanded(
                  child: Padding(
                padding: const EdgeInsets.only(left: 10),
                child: Column(
                  children: [
                    Container(
                      alignment: Alignment.topLeft,
                      child: Text(
                        '德国巴斯夫快乐跑燃油宝汽油添加剂积碳清洗剂节油奔驰宝马保时捷',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color3333),
                      ),
                    ),
                    Container(
                        margin: const EdgeInsets.only(top: 20),
                        alignment: Alignment.centerLeft,
                        child: Text(
                          '每瓶50ml x 5瓶',
                          style: StylesUtils.customTextStyle(color: ColorsUtils.color9999),
                        )),
                  ],
                ),
              ))
            ],
          ),
        ),
        Container(
          padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 25),
          child: Column(
            children: [
              Container(
                alignment: Alignment.centerLeft,
                child: Text(
                  '换货原因：尺码拍错/不喜欢/效果差',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                ),
              ),
              Container(
                margin: const EdgeInsets.symmetric(vertical: 10),
                alignment: Alignment.centerLeft,
                child: Text(
                  '退款金额：100点+¥58.00',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                ),
              ),
              Container(
                alignment: Alignment.centerLeft,
                child: Text(
                  '申请件数：1',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                ),
              ),
              Container(
                margin: const EdgeInsets.symmetric(vertical: 10),
                alignment: Alignment.centerLeft,
                child: Text(
                  '申请时间：2019-4-7 13:04',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                ),
              ),
              Container(
                alignment: Alignment.centerLeft,
                child: Text(
                  '退款编号：23271424057214640',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                ),
              ),
              Container(
                margin: const EdgeInsets.only(top: 25),
                alignment: Alignment.centerLeft,
                child: Text.rich(TextSpan(children: [
                  TextSpan(
                      text: '商家售后服务电话 ',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13)),
                  TextSpan(
                      text: '010-82381908',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color0000, fontSize: StylesUtils.fontSize13))
                ])),
              )
            ],
          ),
        )
      ],
    ));
  }
}

/// 换货成功
class BarterInfoSucceedController extends GetxController {}

class BarterInfoSucceedView extends GetView<BarterInfoSucceedController> {
  const BarterInfoSucceedView({super.key});

  @override
  Widget build(BuildContext context) {
    return SingleChildScrollView(
        child: Column(
      children: [
        Container(
          height: 100,
          color: ColorsUtils.parseColorFromHexString(ColorsUtils.colorF048),
          padding: const EdgeInsets.symmetric(horizontal: 25),
          child: Column(
            children: [
              Container(
                padding: const EdgeInsets.only(top: 20),
                alignment: Alignment.centerLeft,
                child: Text(
                  '换货成功',
                  style: StylesUtils.customTextStyle(fontSize: StylesUtils.fontSize18),
                ),
              ),
              Container(
                padding: const EdgeInsets.only(top: 20),
                alignment: Alignment.centerLeft,
                child: Text(
                  '2019年4月7日  13:04',
                  style: StylesUtils.customTextStyle(),
                ),
              ),
            ],
          ),
        ),
        Container(
          margin: const EdgeInsets.only(top: 30),
          padding: const EdgeInsets.symmetric(horizontal: 10),
          alignment: Alignment.center,
          child: CustomPaint(
            painter: _DrawLine(x: 50),
            child: Row(
              crossAxisAlignment: CrossAxisAlignment.start,
              mainAxisAlignment: MainAxisAlignment.start,
              children: [
                Expanded(
                    child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  mainAxisAlignment: MainAxisAlignment.start,
                  children: [
                    Container(
                        alignment: Alignment.center,
                        child: CircleAvatar(
                          radius: 25,
                          backgroundColor:
                              ColorsUtils.parseColorFromHexString(ColorsUtils.colorF048),
                          child: SvgUtils.assetName('u12779', width: 25, height: 17),
                        )),
                    Container(
                      margin: const EdgeInsets.only(top: 20),
                      alignment: Alignment.center,
                      child: Text(
                        '买家申请',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color3333),
                      ),
                    ),
                    Container(
                      margin: const EdgeInsets.only(top: 15),
                      alignment: Alignment.center,
                      child: Text(
                        '2019-4-7 13:04',
                        style: StylesUtils.customTextStyle(
                            color: ColorsUtils.color9999, fontSize: StylesUtils.fontSize10),
                      ),
                    ),
                  ],
                )),
                Expanded(
                    child: Column(
                  children: [
                    Container(
                        alignment: Alignment.center,
                        child: CircleAvatar(
                          radius: 25,
                          backgroundColor:
                              ColorsUtils.parseColorFromHexString(ColorsUtils.colorF048),
                          child: SvgUtils.assetName('u12779', width: 25, height: 17),
                        )),
                    Container(
                      margin: const EdgeInsets.only(top: 20),
                      alignment: Alignment.center,
                      child: Text(
                        '商家同意',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color3333),
                      ),
                    ),
                    Container(
                      margin: const EdgeInsets.only(top: 15),
                      alignment: Alignment.center,
                      child: Text(
                        '2019-4-8 15:31',
                        style: StylesUtils.customTextStyle(
                            color: ColorsUtils.color9999, fontSize: StylesUtils.fontSize10),
                      ),
                    ),
                  ],
                )),
                Expanded(
                    child: Column(
                  children: [
                    Container(
                        alignment: Alignment.center,
                        child: CircleAvatar(
                          radius: 25,
                          backgroundColor:
                              ColorsUtils.parseColorFromHexString(ColorsUtils.colorF048),
                          child: SvgUtils.assetName('u12779', width: 25, height: 17),
                        )),
                    Container(
                      margin: const EdgeInsets.only(top: 20),
                      alignment: Alignment.center,
                      child: Text(
                        '商家发货',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color3333),
                      ),
                    ),
                    Container(
                      margin: const EdgeInsets.only(top: 15),
                      alignment: Alignment.center,
                      child: Text(
                        '2019-4-9 11:28',
                        style: StylesUtils.customTextStyle(
                            color: ColorsUtils.color9999, fontSize: StylesUtils.fontSize10),
                      ),
                    ),
                  ],
                )),
                Expanded(
                    child: Column(
                  children: [
                    Container(
                        alignment: Alignment.center,
                        child: CircleAvatar(
                          radius: 25,
                          backgroundColor:
                              ColorsUtils.parseColorFromHexString(ColorsUtils.colorF048),
                          child: SvgUtils.assetName('u12779', width: 25, height: 17),
                        )),
                    Container(
                      margin: const EdgeInsets.only(top: 20),
                      alignment: Alignment.center,
                      child: Text(
                        '换货成功',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color3333),
                      ),
                    ),
                    Container(
                      margin: const EdgeInsets.only(top: 15),
                      alignment: Alignment.center,
                      child: Text(
                        '2019-4-9 11:28',
                        style: StylesUtils.customTextStyle(
                            color: ColorsUtils.color9999, fontSize: StylesUtils.fontSize10),
                      ),
                    ),
                  ],
                )),
              ],
            ),
          ),
        ),
        Container(
          padding: const EdgeInsets.only(left: 15),
          margin: const EdgeInsets.only(top: 30, bottom: 20),
          alignment: Alignment.centerLeft,
          child: Text(
            '买家收货后则换货成功',
            style: StylesUtils.customTextStyle(
                color: ColorsUtils.color9999, fontSize: StylesUtils.fontSize12),
          ),
        ),
        Container(
          padding: const EdgeInsets.only(left: 15, bottom: 15),
          alignment: Alignment.centerLeft,
          child: Text(
            '换货信息',
            style: StylesUtils.customTextStyle(
              color: ColorsUtils.color6666,
            ),
          ),
        ),
        Container(
          color: ColorsUtils.parseColorFromHexString(ColorsUtils.colorF2f2),
          height: 116,
          padding: const EdgeInsets.symmetric(horizontal: 25, vertical: 10),
          child: Row(
            crossAxisAlignment: CrossAxisAlignment.start,
            mainAxisAlignment: MainAxisAlignment.start,
            children: [
              CachedNetworkImage(
                imageUrl:
                    'https://img.alicdn.com/imgextra/i2/3517899888/O1CN01zcysko2MulFTX956t_!!0-saturn_solar.jpg_360x360xzq75.jpg_.webp',
                width: 95,
                height: 95,
                fit: BoxFit.fill,
              ),
              Expanded(
                  child: Padding(
                padding: const EdgeInsets.only(left: 10),
                child: Column(
                  children: [
                    Container(
                      alignment: Alignment.topLeft,
                      child: Text(
                        '德国巴斯夫快乐跑燃油宝汽油添加剂积碳清洗剂节油奔驰宝马保时捷',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color3333),
                      ),
                    ),
                    Container(
                        margin: const EdgeInsets.only(top: 20),
                        alignment: Alignment.centerLeft,
                        child: Text(
                          '每瓶50ml x 5瓶',
                          style: StylesUtils.customTextStyle(color: ColorsUtils.color9999),
                        )),
                  ],
                ),
              ))
            ],
          ),
        ),
        Container(
          padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 25),
          child: Column(
            children: [
              Container(
                alignment: Alignment.centerLeft,
                child: Text(
                  '换货原因：尺码拍错/不喜欢/效果差',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                ),
              ),
              Container(
                margin: const EdgeInsets.symmetric(vertical: 10),
                alignment: Alignment.centerLeft,
                child: Text(
                  '退款金额：100点+¥58.00',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                ),
              ),
              Container(
                alignment: Alignment.centerLeft,
                child: Text(
                  '申请件数：1',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                ),
              ),
              Container(
                margin: const EdgeInsets.symmetric(vertical: 10),
                alignment: Alignment.centerLeft,
                child: Text(
                  '申请时间：2019-4-7 13:04',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                ),
              ),
              Container(
                alignment: Alignment.centerLeft,
                child: Text(
                  '退款编号：23271424057214640',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13),
                ),
              ),
              Container(
                margin: const EdgeInsets.only(top: 25),
                alignment: Alignment.centerLeft,
                child: Text.rich(TextSpan(children: [
                  TextSpan(
                      text: '商家售后服务电话 ',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color6666, fontSize: StylesUtils.fontSize13)),
                  TextSpan(
                      text: '010-82381908',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color0000, fontSize: StylesUtils.fontSize13))
                ])),
              )
            ],
          ),
        )
      ],
    ));
  }
}

class _DrawLine extends CustomPainter {
  double x;

  _DrawLine({this.x = 50});

  @override
  void paint(Canvas canvas, Size size) {
    Paint paint = Paint()
      ..color = ColorsUtils.parseColorFromHexString(ColorsUtils.colorCccc)
      ..strokeWidth = 1
      ..style = PaintingStyle.stroke;

    canvas.drawLine(Offset(x, x / 2), Offset(size.width - x, x / 2), paint);
  }

  @override
  bool shouldRepaint(covariant CustomPainter oldDelegate) {
    return this != oldDelegate;
  }
}
